﻿<sap:ActivityDesigner x:Class="Vision.Core.ActivityComponents.IO.Ftp.FtpRemoveFileDesigner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sap="clr-namespace:System.Activities.Presentation;assembly=System.Activities.Presentation"
    xmlns:sapc="clr-namespace:System.Activities.Presentation.Converters;assembly=System.Activities.Presentation"
    xmlns:sapv="clr-namespace:System.Activities.Presentation.View;assembly=System.Activities.Presentation"
    Collapsible="False" ExpandState="True">
    <sap:ActivityDesigner.Resources>
        <sapc:ArgumentToExpressionConverter x:Key="argumentToExpressionConverter" />

        <DataTemplate x:Key="ExpandedActivityViewTemplate">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="File name:" />
                <sapv:ExpressionTextBox Grid.Column="1" x:Name="fileNameBox" MinWidth="120"
                                MaxLines="1" Margin="7,0,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Top"
                                Expression="{Binding Path=ModelItem.FileName, Mode=TwoWay, Converter={StaticResource argumentToExpressionConverter}, ConverterParameter=In}"
                                ExpressionType="{Binding Path=ModelItem.FileName.ArgumentType}"
                                OwnerActivity="{Binding Path=ModelItem, Mode=OneWay}" />
            </StackPanel>
        </DataTemplate>

        <Style x:Key="RemoveFileStyle" TargetType="{x:Type ContentPresenter}">
            <Setter x:Uid="Setter_1" Property="ContentTemplate" Value="{DynamicResource ExpandedActivityViewTemplate}" />
        </Style>
    </sap:ActivityDesigner.Resources>

    <ContentPresenter Content="{Binding}" Style="{DynamicResource RemoveFileStyle}" />
</sap:ActivityDesigner>
